from DrissionPage import Chromium, ChromiumPage, WebPage, SessionPage

# tab = Chromium().latest_tab
# tab.get('https://gitee.com/login')
# user_login = tab.ele('xpath=//input[@id="user_login"]')
# user_login.input('2094729537@qq.com')
# user_password = tab.ele('xpath=//input[@id="user_password"]')
# user_password.input('zdz123123')
# login_button = tab.ele('xpath=//input[@value="登 录"]')
# login_button.click()

tab = Chromium().latest_tab
tab.get('https://gitee.com/explore/all')
# 模式 d == 自动化 s == requests
tab.change_mode()
titles = tab.eles('xpath=//a[@class="title project-namespace-path"]')
for title in titles:
    print(title.text, title.attrs['href'])
